package com.collection.web.pagination;

import java.util.List;

public class PageBuilder {
	
	/**
	 * 构建Page对象
	 * @param pageRequest
	 * @param result
	 * @param total
	 * @return
	 */
	public static <T>Page<T> buildPage(PageRequest pageRequest,List<T> result,int total){
		Page<T> page  = new Page<T>(pageRequest);
		page.setRows(result);
		page.setTotal(total);
		return page;
	}
}
